package org.example.dev.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

//封装分页对象
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageBean<T>{
    private Long total;//总条数
    private int currentPage; // 当前页码
    private int pageSize; // 每页大小
    private List<T> items;//当前页数据集合
    private String message; // 错误信息

    public PageBean(long total, List<T> records) {
        this.total = total;
        this.items = records;
    }
}
